from url_manage import urlmanage
import url_download
import url_resolve

um=urlmanage()
url="http://www.etongdai.com/"
um.set_url(url)

while True:
    u=um.get_url()
    #print(2)
    if not u==None:
        if not u.startswith('http'):
            u=url + u
        print(u)
        response=url_download.urldownload(u)
        if not response==None:
            urls=url_resolve.urlresolve(response)
        if not urls==None:
            for u in urls:
                um.set_url(u)
    else:
        break
print(3)
"""
allurls=um.get_allurl()
for u in allurls:
    print(u)
"""
